package com.mo.tools.log.oplog;

import java.util.Map;

public class LogContext {
    /**
     * el eg: 对象类型：#param.id
     * el eg: 基础数据类型: #param
     */
    public static ThreadLocal<Object> param = new InheritableThreadLocal<>();
    /**
     * el eg: 对象类型：#result.id
     * el eg: 基础数据类型: #result
     */
    public static ThreadLocal<Object> result = new InheritableThreadLocal<>();
    /**
     * el eg: #extMap.get('id')
     */
    public static ThreadLocal<Map<String, Object>> extMap = new InheritableThreadLocal<>();

    public static void clearContext() {
        param.remove();
        result.remove();
        extMap.remove();
    }
}
